#include <iostream>
#include <memory.h>
#include <string>

class Target
{
public:
    Target() {}
    virtual ~Target() {}
    virtual void Request()
    {
        std::cout << "Target::Request" << std::endl;
    }
};

// 适配者
class Adaptee
{
public:
    Adaptee() {}
    ~Adaptee() {}
    void SpecificRequest()
    {
        std::cout << "适配者 Adaptee::SpecificRequest" << std::endl;
    }
};

// 适配器
class Adapter : public Target
{
public:
    Adapter(Adaptee *ade)
    {
        _ade = ade;
    }
    ~Adapter() {}
    void Request()
    {
        _ade->SpecificRequest();
    }

private:
    Adaptee *_ade;
};

int main()
{
    Adaptee *ade = new Adaptee;
    Target *adt = new Adapter(ade);
    adt->Request();

    return 0;
}

/*
适配者 Adaptee::SpecificRequest

 */